#Modificar variable para especificar directorio del Proyecto Final
#local.path <- "/Users/akcasill/Downloads"
local.path <- "/Users/jos/Downloads"
#Dependencies
#install.packages("png")
install.packages("rid")
Warning in install.packages :
package ‘rid’ is not available (for R version 3.6.3)
library(png)
#ASISTENCIAS TOTALES
setwd(local.path)
The working directory was changed to /Users/jos/Downloads inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.
# son 9 semestres de 6 materias cada uno.
# 1.- Asistencias Totales
load("AsistenciasTotales.R")
class(asistencias.totales)
[1] "list"
length(asistencias.totales)
[1] 1000
class(asistencias.totales[[1]])
[1] "matrix"
dim(asistencias.totales[[1]])
[1] 32 54
class(asistencias.totales[1])
[1] "list"
asistencias.totales[[1]][1:10,1:10]
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,] 2 2 2 2 2 2 1 2 2 2
[2,] 2 2 2 2 2 0 2 2 2 2
[3,] 2 2 2 2 2 2 2 0 2 2
[4,] 2 2 2 2 2 2 2 0 2 2
[5,] 2 1 2 1 2 1 2 2 2 2
[6,] 2 1 2 2 2 0 0 0 2 2
[7,] 1 2 2 1 2 0 2 2 2 2
[8,] 2 2 2 0 2 1 1 1 2 2
[9,] 2 2 2 0 1 2 2 0 2 2
[10,] 2 2 2 2 2 2 2 0 0 2
#Asistencias
#===================
#Definición Valores
#===================
# 2 El alumno tiene asistnecia completa.
# 1 El alumno tiene retardo.
# 0 El alumno tiene falta.
#Sólo tomar las primeras 12 materias (Columnas)
for(i in 1:length(asistencias.totales)){
asistencias.totales[[i]] <- asistencias.totales[[i]][,1:12]
}
asistencias.totales[[4]]
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
[1,] 2 2 2 2 2 2 0 2 2 2 2 2
[2,] 2 2 2 2 2 1 2 2 2 2 2 2
[3,] 2 2 2 2 0 2 2 1 2 2 2 1
[4,] 2 2 2 2 2 2 2 2 2 2 2 2
[5,] 2 1 2 2 2 2 2 2 2 2 2 2
[6,] 2 1 2 2 1 1 2 1 2 2 1 2
[7,] 1 2 2 2 2 1 2 2 2 2 2 2
[8,] 2 2 2 2 1 2 1 0 2 2 2 2
[9,] 2 2 2 1 0 2 2 1 0 2 2 2
[10,] 2 2 2 2 2 2 2 2 1 2 2 2
[11,] 2 2 2 2 2 2 2 2 2 2 2 2
[12,] 2 2 2 2 2 2 2 2 2 2 2 2
[13,] 2 2 2 2 2 2 2 2 1 2 2 2
[14,] 2 2 2 1 2 2 2 2 2 2 2 2
[15,] 2 2 2 2 2 2 2 2 2 2 2 2
[16,] 2 2 2 2 2 2 2 0 2 2 2 2
[17,] 2 1 2 1 2 2 2 2 2 2 2 2
[18,] 0 2 2 2 1 2 2 2 1 2 2 2
[19,] 2 2 2 1 2 2 0 2 2 2 2 2
[20,] 2 2 2 2 1 2 2 2 2 2 2 2
[21,] 1 2 2 2 1 1 2 2 1 2 2 2
[22,] 2 2 2 0 1 2 2 2 2 2 2 2
[23,] 2 2 2 2 2 2 0 2 2 2 2 2
[24,] 2 2 2 2 2 2 2 2 2 2 2 2
[25,] 2 2 2 2 2 2 0 2 2 2 2 2
[26,] 2 2 2 2 2 2 2 0 1 2 2 2
[27,] 2 2 2 2 2 2 2 2 2 2 2 2
[28,] 2 2 2 2 0 2 2 2 2 2 2 2
[29,] 2 1 2 2 2 2 1 2 1 2 2 2
[30,] 2 2 2 2 0 2 2 1 0 2 2 2
[31,] 2 2 2 2 2 2 2 2 2 2 2 2
[32,] 2 2 2 2 2 2 2 2 1 2 2 2
Tamaño de Lista de Asistencia de Alumnos:
length(asistencias.totales)
[1] 1000
Lista de total Asistencias por Alumno
#
#for(i in 1:length(asistencias.totales)){
# asistencias.totales[[i]] <- asistencias.totales[[i]][,1:12]
#}
asistencias.alumnos <- matrix(1:12000, nrow=1000, ncol=12)
for(i in 1:length(asistencias.totales)){
for(j in 1:12){
asistencias.alumnos[i,j] <- sum(asistencias.totales[[i]][,j])/32
}
}
asistencias.alumnos[1,]
[1] 1.87500 1.87500 2.00000 1.40625 1.90625 1.43750 1.59375 1.12500 1.84375 2.00000 1.96875 1.96875
asistencias.df <- as.data.frame(asistencias.alumnos)
#Asistencia Materias Ejemplo: AM1 = Asistencia Materia 1
colnames(asistencias.df) <- c('AM1','AM2','AM3','AM4','AM5','AM6','AM7','AM8','AM9','AM10','AM11','AM12')
#DATA FRAME DE ASISTENCIAS ALUMNOS
#=================================
#Suma de asistencias por Materia
#=================================
asistencias.df
#PERFIL ALUMNOS
setwd(local.path)
The working directory was changed to /Users/jos/Downloads inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.
print("Summary")
[1] "Summary"
load("perfilAlumnos.R")
#head(perfil.alumnos,1)
str(perfil.alumnos)
'data.frame': 1000 obs. of 7 variables:
$ genero : int 2 2 2 1 2 2 2 2 1 2 ...
$ admision.letras : num 60.1 59.1 53.1 57 61.5 ...
$ admision.numeros : num 35.2 33.2 21.3 29 37.9 ...
$ promedio.preparatoria : num 70.3 67.2 60 61 74.4 ...
$ edad.ingreso : num 18 17 15 16 18 18 15 17 14 17 ...
$ evalucion.socioeconomica: int 4 4 4 4 4 4 4 4 4 4 ...
$ nota.conducta : num 16 15 13 14 16 16 13 15 12 15 ...
summary(perfil.alumnos)
genero admision.letras admision.numeros promedio.preparatoria edad.ingreso evalucion.socioeconomica nota.conducta
Min. :1.000 Min. :44.94 Min. : 4.878 Min. : 60.00 Min. :11.00 Min. :1.000 Min. : 9.00
1st Qu.:1.000 1st Qu.:56.61 1st Qu.:28.226 1st Qu.: 60.00 1st Qu.:16.00 1st Qu.:3.000 1st Qu.:14.00
Median :2.000 Median :59.98 Median :34.970 Median : 69.95 Median :17.00 Median :4.000 Median :15.00
Mean :1.595 Mean :60.06 Mean :35.114 Mean : 72.25 Mean :17.53 Mean :3.466 Mean :15.53
3rd Qu.:2.000 3rd Qu.:63.64 3rd Qu.:42.275 3rd Qu.: 80.91 3rd Qu.:19.00 3rd Qu.:4.000 3rd Qu.:17.00
Max. :2.000 Max. :77.71 Max. :70.411 Max. :100.00 Max. :25.00 Max. :4.000 Max. :20.00
#===================
#Definición Valores
#===================
# Genero: 2 Hombre, 1 Mujer.
# admision.letras: Calificación Examen Admisión Español
# admision.numeros: Calificación Examen Admisión Matemáticas
# promedio.preparatoria: Calificación Promedio Preparatoria
# edad.ingreso: Edad, variable numérica
# evalucion.socioeconomica: 1 más privilegiado, 4 menos privilagiado
# nota.conducta: Calificación subjetiva.
perfil.alumnos$genero <- factor(perfil.alumnos$genero)
perfil.alumnos$evalucion.socioeconomica <-
factor(perfil.alumnos$evalucion.socioeconomica)
perfil.alumnos$edad.ingreso <-
factor(perfil.alumnos$edad.ingreso)
#DATAFRAME CALIFICACIONES ALUMNOS
setwd(local.path)
The working directory was changed to /Users/jos/Downloads inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.
print("Summary")
[1] "Summary"
# 3 1000 matrices de 2 x 54, calificación entre 1 y 20
load("ResultadosExamenes.R")
#resultados.examenes.totales
examenes.alumnos <- matrix(1:12000, nrow=1000, ncol=12)
for(i in 1:length(resultados.examenes.totales)){
for(j in 1:12){
examenes.alumnos[i,j] <- sum(resultados.examenes.totales[[i]][,j])/2
}
}
examenes.alumnos[1,]
[1] 11.956449 12.330884 12.463337 15.189492 12.328150 17.087821 9.466637 12.011178 11.368753 12.221370 11.416652 12.330704
cal.alumnos.df <- as.data.frame(examenes.alumnos)
#Calificaciones Materias Ejemplo: CM2 = Calificiación Promedio Materia 2
colnames(cal.alumnos.df) <- c('CM1','CM2','CM3','CM4','CM5','CM6','CM7','CM8','CM9','CM10','CM11','CM12')
#===================
#Definición Valores
#===================
# CM1: Calificación Materia 1 valor Máximo 20
cal.alumnos.df
#TRABAJOS POR CLASE
setwd(local.path)
The working directory was changed to /Users/jos/Downloads inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.
print("Summary")
[1] "Summary"
# 4 1000 matrices de 4 x 54, son 4 trabajos por clase, entre 1 y 20
load("ResultadoTrabajos.R")
resultados.trabajos.totales[[2]][,1]
[1] 11.79653 12.11637 12.71856 13.72462
tareas.alumnos <- matrix(1:12000, nrow=1000, ncol=12)
for(i in 1:length(resultados.trabajos.totales)){
for(j in 1:12){
tareas.alumnos[i,j] <- sum(resultados.trabajos.totales[[i]][,j])/4
}
}
#tareas.alumnos[1,]
tareas.alumnos.df <- as.data.frame(tareas.alumnos)
#Tareas Materias Ejemplo: TM2 = Tareas Promedio Materia 2
colnames(tareas.alumnos.df) <- c('TM1','TM2','TM3','TM4','TM5','TM6','TM7','TM8','TM9','TM10','TM11','TM12')
#===================
#Definición Valores
#===================
# TM1: Calificación Tarea Materia 1 valor Máximo 20
tareas.alumnos.df
#VISITAS BIBLIOTECA
# 5 Redondear. Uso fÃsico y virtual. vector. 1000 Matrices, número de veces que asistio a la biblioteca por materia
setwd(local.path)
The working directory was changed to /Users/jos/Downloads inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.
load("UsoBiblioteca.R")
length(uso.biblioteca.totales)
[1] 1000
mi.val <- uso.biblioteca.totales[[1]][1,1]
mi.val
[1] 12.65509
mi.val <- as.data.frame(mi.val)
mi.val
visitas.biblio.alumnos <- matrix(1:12000, nrow=1000, ncol=12)
for(i in 1:1000){
for(j in 1:12){
visitas.biblio.alumnos[i,j] <- uso.biblioteca.totales[[i]][1,j]
}
}
visitas.biblio.alumnos.df <- as.data.frame(visitas.biblio.alumnos)
#Visitas Biblioteca Ejemplo: VBM2 = Visitas Biblioteca Materia 2
colnames(visitas.biblio.alumnos.df) <- c('VBM1','VBM2','VBM3','VBM4','VBM5','VBM6','VBM7','VBM8','VBM9','VBM10','VBM11','VBM12')
#===================
#Definición Valores
#===================
# VBM1: Visitas Biblioteca Materia 1
visitas.biblio.alumnos.df
NA
NA
#USO DE PLATAFORMAS DIGITALES
# 6 Redondear, vector. Uso de Canvas o de Plataforma digital.
setwd(local.path)
The working directory was changed to /Users/jos/Downloads inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.
load("UsoPlataforma.R")
#uso.plataforma.totales
uso.plataforma.totales[[1]][,1:12]
[1] 32.796526 32.554647 32.504125 79.290015 32.600643 80.313415 5.944546 33.398886 32.664804 33.522435 32.831749 32.208083
plataformas.alumnos <- matrix(1:12000, nrow=1000, ncol=12)
for(i in 1:1000){
for(j in 1:12){
plataformas.alumnos[i,j] <- uso.plataforma.totales[[i]][1,j]
}
}
#tareas.alumnos[1,]
plataformas.alumnos.df <- as.data.frame(plataformas.alumnos)
#Tareas Materias Ejemplo: TM2 = Tareas Promedio Materia 2
colnames(plataformas.alumnos.df) <- c('PDM1','PDM2','PDM3','PDM4','PDM5','PDM6','PDM7','PDM8','PDM9','PDM10','PDM11','PDM12')
#===================
#Definición Valores
#===================
# PDM1: Plataformas Digitales Materia 1 valor Máximo 20
plataformas.alumnos.df
NA
#APARTADO DE LIBROS POR MATERIA
# 7
setwd(local.path)
The working directory was changed to /Users/jos/Downloads inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.
load("ApartadoDeLibros.R") #1000 matrices, cantidad de libros que el alumno reservó por materia.
separacion.libros.totales[[1]][,1:12]
[1] 1 1 1 3 1 3 0 1 1 1 1 1
reserva.libros.alumnos <- matrix(1:12000, nrow=1000, ncol=12)
for(i in 1:1000){
for(j in 1:12){
reserva.libros.alumnos[i,j] <- separacion.libros.totales[[i]][1,j]
}
}
reserva.libros.alumnos.df <- as.data.frame(reserva.libros.alumnos)
#Reserva de Libris Ejemplo: RLM2 = Reserva de Libros Por Materia 2
colnames(reserva.libros.alumnos.df) <- c('RLM1','RLM2','RLM3','RLM4','RLM5','RLM6','RLM7','RLM8','RLM9','RLM10','RLM11','RLM12')
#===================
#Definición Valores
#===================
# RLM1: Reserva de Libros pro Materia 1
reserva.libros.alumnos.df
NA
#DISTRIBUCIÓN DE BECAS ALUMNOS
# 8 vector binario, 1 tiene beca, 0 no tiene Beca
setwd(local.path)
The working directory was changed to /Users/jos/Downloads inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.
load("Becas.R")
distribucion.becas[[1]]
[1] 0
sum(distribucion.becas)
[1] 163
becas.alumnos <- matrix(1:1000, nrow=1000, ncol=1)
for(i in 1:1000){
becas.alumnos[i] <- distribucion.becas[i]
}
becas.alumnos.df <- as.data.frame(becas.alumnos)
colnames(becas.alumnos.df) <- c('BECA')
#===================
#Definición Valores
#===================
# BECA: Tiene Beca 1
becas.alumnos.df
#Necesita ser un factor por que solo tiene dos valores 0 o 1
becas.alumnos.df$BECA <- as.factor(becas.alumnos.df$BECA)
becas.alumnos.df
#HISTORIAL DE PAGOS ALUMNOS
# 9 2 en tiempo, 1 retraso, 0, Son 9 semestres pero hay que user sólo 2 primeras columnas, 4 pagos.
setwd(local.path)
The working directory was changed to /Users/jos/Downloads inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.
load("HistorialPagos.R")
length(registro.pagos)
[1] 1000
registro.pagos[[500]]
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
[1,] 2 2 2 2 2 2 1 2 2
[2,] 2 1 1 2 2 2 2 2 2
[3,] 2 2 2 2 1 2 2 1 2
[4,] 1 2 2 2 2 2 2 1 2
pagos.alumnos <- matrix(1:2000, nrow=1000, ncol=2)
for(i in 1:1000){
for(j in 1:2){
pagos.alumnos[i,j] <- sum(registro.pagos[[i]][,j])/4
}
}
#tareas.alumnos[1,]
pagos.alumnos.df <- as.data.frame(pagos.alumnos)
#Pago Semestre: PSEM2 = Pago Semestre 2
colnames(pagos.alumnos.df) <- c('PSEM1','PSEM2')
#===================
#Definición Valores
#===================
# PSEM1: Suma de pagos semestre 1, 2 valor máximo.
pagos.alumnos.df
NA
datos.alumnos.df <- cbind.data.frame(perfil.alumnos,
becas.alumnos.df,
asistencias.df,
cal.alumnos.df,
tareas.alumnos.df,
visitas.biblio.alumnos.df,
plataformas.alumnos.df,
reserva.libros.alumnos.df,
pagos.alumnos.df)
datos.alumnos.df
NA
str(datos.alumnos.df)
'data.frame': 1000 obs. of 82 variables:
$ genero : Factor w/ 2 levels "1","2": 2 2 2 1 2 2 2 2 1 2 ...
$ admision.letras : num 60.1 59.1 53.1 57 61.5 ...
$ admision.numeros : num 35.2 33.2 21.3 29 37.9 ...
$ promedio.preparatoria : num 70.3 67.2 60 61 74.4 ...
$ edad.ingreso : Factor w/ 15 levels "11","12","13",..: 8 7 5 6 8 8 5 7 4 7 ...
$ evalucion.socioeconomica: Factor w/ 4 levels "1","2","3","4": 4 4 4 4 4 4 4 4 4 4 ...
$ nota.conducta : num 16 15 13 14 16 16 13 15 12 15 ...
$ BECA : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
$ AM1 : num 1.88 1.88 1.88 1.88 1.88 ...
$ AM2 : num 1.88 1.41 1.41 1.88 1.41 ...
$ AM3 : num 2 2 2 2 1.72 ...
$ AM4 : num 1.41 1.81 1.81 1.81 1.81 ...
$ AM5 : num 1.91 1.5 1.38 1.56 1.91 ...
$ AM6 : num 1.44 1.38 1.12 1.88 1.12 ...
$ AM7 : num 1.59 1.69 1.69 1.69 1.69 ...
$ AM8 : num 1.12 1.12 1.94 1.69 1.12 ...
$ AM9 : num 1.84 1.84 1.84 1.66 1.66 ...
$ AM10 : num 2 2 1.22 2 2 ...
$ AM11 : num 1.97 1.97 1.97 1.97 1.97 ...
$ AM12 : num 1.97 1.97 1.97 1.97 1.97 ...
$ CM1 : num 12 12 12 12 12 ...
$ CM2 : num 12.3 12.3 15.8 15.8 12.3 ...
$ CM3 : num 12.5 12.5 12.5 16 16 ...
$ CM4 : num 15.2 11.9 11.9 15.2 11.9 ...
$ CM5 : num 12.3 15.8 12.3 12.3 12.3 ...
$ CM6 : num 17.1 17.1 13.3 17.1 13.3 ...
$ CM7 : num 9.47 13.08 13.08 13.08 13.08 ...
$ CM8 : num 12.01 15.35 12.01 7.69 15.35 ...
$ CM9 : num 11.37 11.37 11.37 18.25 6.61 ...
$ CM10 : num 12.2 12.2 12.2 15.6 12.2 ...
$ CM11 : num 11.4 11.4 11.4 11.4 11.4 ...
$ CM12 : num 12.3 12.3 12.3 15.8 12.3 ...
$ TM1 : num 12.6 12.6 12.6 12.6 12.6 ...
$ TM2 : num 12.2 12.2 15.6 15.6 12.2 ...
$ TM3 : num 12.3 12.3 12.3 15.7 15.7 ...
$ TM4 : num 15.2 11.9 11.9 15.2 11.9 ...
$ TM5 : num 12.6 16.1 12.6 12.6 12.6 ...
$ TM6 : num 16.2 16.2 12.6 16.2 12.6 ...
$ TM7 : num 7.97 12.18 12.18 12.18 12.18 ...
$ TM8 : num 12.59 16.13 12.59 8.66 16.13 ...
$ TM9 : num 11.5 11.5 11.5 18.33 6.84 ...
$ TM10 : num 12.5 12.5 12.5 15.9 12.5 ...
$ TM11 : num 11.6 11.6 11.6 11.6 11.6 ...
$ TM12 : num 12.6 12.6 12.6 16.1 12.6 ...
$ VBM1 : num 12.7 12.7 12.7 12.7 12.7 ...
$ VBM2 : num 11.8 11.8 27.8 27.8 11.8 ...
$ VBM3 : num 11.7 11.7 11.7 27.5 27.5 ...
$ VBM4 : num 33.8 15.9 15.9 33.8 15.9 ...
$ VBM5 : num 12 28 12 12 12 ...
$ VBM6 : num 34.1 34.1 16.1 34.1 16.1 ...
$ VBM7 : num 2.98 19.89 19.89 19.89 19.89 ...
$ VBM8 : num 14.66 31.99 14.66 1.93 31.99 ...
$ VBM9 : num 12.22 12.22 12.22 62.22 1.44 ...
$ VBM10 : num 15.1 15.1 15.1 32.6 15.1 ...
$ VBM11 : num 12.8 12.8 12.8 12.8 12.8 ...
$ VBM12 : num 10.7 10.7 10.7 26 10.7 ...
$ PDM1 : num 32.8 32.8 32.8 32.8 32.8 ...
$ PDM2 : num 32.6 32.6 59.2 59.2 32.6 ...
$ PDM3 : num 32.5 32.5 32.5 58.4 58.4 ...
$ PDM4 : num 79.3 33.8 33.8 79.3 33.8 ...
$ PDM5 : num 32.6 60 32.6 32.6 32.6 ...
$ PDM6 : num 80.3 80.3 33.8 80.3 33.8 ...
$ PDM7 : num 5.94 34.97 34.97 34.97 34.97 ...
$ PDM8 : num 33.4 73.31 33.4 3.33 73.31 ...
$ PDM9 : num 32.66 32.66 32.66 161.08 2.11 ...
$ PDM10 : num 33.5 33.5 33.5 75.4 33.5 ...
$ PDM11 : num 32.8 32.8 32.8 32.8 32.8 ...
$ PDM12 : num 32.2 32.2 32.2 53.5 32.2 ...
$ RLM1 : num 1 1 1 1 1 1 4 2 1 1 ...
$ RLM2 : num 1 1 2 2 1 0 2 1 1 2 ...
$ RLM3 : num 1 1 1 2 2 2 2 2 1 2 ...
$ RLM4 : num 3 1 1 3 1 3 3 3 1 1 ...
$ RLM5 : num 1 2 1 1 1 1 2 1 1 2 ...
$ RLM6 : num 3 3 1 3 1 5 0 3 1 3 ...
$ RLM7 : num 0 1 1 1 1 5 3 1 1 3 ...
$ RLM8 : num 1 2 1 0 2 1 4 0 1 2 ...
$ RLM9 : num 1 1 1 4 0 1 2 2 1 1 ...
$ RLM10 : num 1 1 1 3 1 3 3 3 5 3 ...
$ RLM11 : num 1 1 1 1 1 1 2 1 1 1 ...
$ RLM12 : num 1 1 1 2 1 0 2 1 1 1 ...
$ PSEM1 : num 2 2 2 2 2 2 1.5 2 2 2 ...
$ PSEM2 : num 2 1.5 1.5 2 2 1.5 2 2 2 2 ...
summary(datos.alumnos.df)
genero admision.letras admision.numeros promedio.preparatoria edad.ingreso evalucion.socioeconomica nota.conducta BECA AM1 AM2
1:405 Min. :44.94 Min. : 4.878 Min. : 60.00 17 :200 1: 56 Min. : 9.00 0:837 Min. :1.875 Min. :1.406
2:595 1st Qu.:56.61 1st Qu.:28.226 1st Qu.: 60.00 18 :167 2:107 1st Qu.:14.00 1:163 1st Qu.:1.875 1st Qu.:1.875
Median :59.98 Median :34.970 Median : 69.95 19 :166 3:152 Median :15.00 Median :1.875 Median :1.875
Mean :60.06 Mean :35.114 Mean : 72.25 16 :140 4:685 Mean :15.53 Mean :1.875 Mean :1.779
3rd Qu.:63.64 3rd Qu.:42.275 3rd Qu.: 80.91 20 :113 3rd Qu.:17.00 3rd Qu.:1.875 3rd Qu.:1.875
Max. :77.71 Max. :70.411 Max. :100.00 15 : 98 Max. :20.00 Max. :1.875 Max. :1.875
(Other):116
AM3 AM4 AM5 AM6 AM7 AM8 AM9 AM10 AM11 AM12
Min. :1.031 Min. :1.031 Min. :1.375 Min. :1.125 Min. :1.406 Min. :1.125 Min. :1.562 Min. :1.219 Min. :1.562 Min. :1.438
1st Qu.:1.719 1st Qu.:1.406 1st Qu.:1.562 1st Qu.:1.438 1st Qu.:1.594 1st Qu.:1.875 1st Qu.:1.797 1st Qu.:2.000 1st Qu.:1.969 1st Qu.:1.969
Median :2.000 Median :1.812 Median :1.906 Median :1.875 Median :1.688 Median :1.938 Median :1.844 Median :2.000 Median :1.969 Median :1.969
Mean :1.837 Mean :1.658 Mean :1.794 Mean :1.720 Mean :1.632 Mean :1.801 Mean :1.781 Mean :1.872 Mean :1.892 Mean :1.875
3rd Qu.:2.000 3rd Qu.:1.812 3rd Qu.:1.906 3rd Qu.:1.875 3rd Qu.:1.688 3rd Qu.:1.938 3rd Qu.:1.844 3rd Qu.:2.000 3rd Qu.:1.969 3rd Qu.:1.969
Max. :2.000 Max. :1.812 Max. :1.906 Max. :1.875 Max. :1.688 Max. :1.938 Max. :1.844 Max. :2.000 Max. :1.969 Max. :1.969
CM1 CM2 CM3 CM4 CM5 CM6 CM7 CM8 CM9
Min. : 7.594 Min. : 8.218 Min. : 8.439 Min. : 7.487 Min. : 8.214 Min. : 9.86 Min. : 9.467 Min. : 7.685 Min. : 6.615
1st Qu.:11.956 1st Qu.:12.331 1st Qu.:12.463 1st Qu.:11.892 1st Qu.:12.328 1st Qu.:13.32 1st Qu.:13.080 1st Qu.:12.011 1st Qu.:11.369
Median :11.956 Median :12.331 Median :12.463 Median :11.892 Median :12.328 Median :13.32 Median :13.080 Median :12.011 Median :11.369
Mean :12.751 Mean :13.567 Mean :13.701 Mean :13.064 Mean :13.582 Mean :14.72 Mean :14.600 Mean :13.233 Mean :12.493
3rd Qu.:11.956 3rd Qu.:15.775 3rd Qu.:15.951 3rd Qu.:15.189 3rd Qu.:15.771 3rd Qu.:17.09 3rd Qu.:16.773 3rd Qu.:15.348 3rd Qu.:14.492
Max. :18.638 Max. :18.887 Max. :18.976 Max. :18.595 Max. :18.885 Max. :19.54 Max. :19.387 Max. :18.674 Max. :18.246
CM10 CM11 CM12 TM1 TM2 TM3 TM4 TM5 TM6
Min. : 8.036 Min. : 6.694 Min. : 8.218 Min. : 8.648 Min. : 8.036 Min. : 8.11 Min. : 7.457 Min. : 8.608 Min. : 8.735
1st Qu.:12.221 1st Qu.:11.417 1st Qu.:12.331 1st Qu.:12.589 1st Qu.:12.221 1st Qu.:12.27 1st Qu.:11.874 1st Qu.:12.565 1st Qu.:12.641
Median :12.221 Median :11.417 Median :12.331 Median :12.589 Median :12.221 Median :12.27 Median :11.874 Median :12.565 Median :12.641
Mean :13.488 Mean :12.466 Mean :13.539 Mean :13.375 Mean :13.437 Mean :13.47 Mean :13.043 Mean :13.865 Mean :13.931
3rd Qu.:15.628 3rd Qu.:14.556 3rd Qu.:15.774 3rd Qu.:12.589 3rd Qu.:15.629 3rd Qu.:15.69 3rd Qu.:15.166 3rd Qu.:16.087 3rd Qu.:16.188
Max. :18.814 Max. :18.278 Max. :18.887 Max. :19.059 Max. :18.814 Max. :18.84 Max. :18.583 Max. :19.043 Max. :19.094
TM7 TM8 TM9 TM10 TM11 TM12 VBM1 VBM2 VBM3
Min. : 7.965 Min. : 8.657 Min. : 6.836 Min. : 8.418 Min. : 7.003 Min. : 8.624 Min. : 1.531 Min. : 1.37 Min. : 1.336
1st Qu.:12.179 1st Qu.:12.594 1st Qu.:11.502 1st Qu.:12.451 1st Qu.:11.602 1st Qu.:12.574 1st Qu.:12.655 1st Qu.:11.85 1st Qu.:11.680
Median :12.179 Median :12.594 Median :11.502 Median :12.451 Median :11.602 Median :12.574 Median :12.655 Median :11.85 Median :11.680
Mean :13.539 Mean :13.920 Mean :12.650 Mean :13.758 Mean :12.688 Mean :13.829 Mean :19.024 Mean :19.30 Mean :19.149
3rd Qu.:15.572 3rd Qu.:16.126 3rd Qu.:14.669 3rd Qu.:15.934 3rd Qu.:14.802 3rd Qu.:16.099 3rd Qu.:12.655 3rd Qu.:27.77 3rd Qu.:27.521
Max. :18.786 Max. :19.063 Max. :18.334 Max. :18.967 Max. :18.401 Max. :19.050 Max. :62.655 Max. :61.85 Max. :61.680
VBM4 VBM5 VBM6 VBM7 VBM8 VBM9 VBM10 VBM11 VBM12
Min. : 2.172 Min. : 1.40 Min. : 2.213 Min. : 2.978 Min. : 1.933 Min. : 1.443 Min. : 2.015 Min. : 1.554 Min. : 1.139
1st Qu.:15.858 1st Qu.:12.00 1st Qu.:16.063 1st Qu.:19.889 1st Qu.:14.663 1st Qu.:12.216 1st Qu.:15.075 1st Qu.:12.773 1st Qu.:10.694
Median :15.858 Median :12.00 Median :16.063 Median :19.889 Median :14.663 Median :12.216 Median :15.075 Median :12.773 Median :10.694
Mean :23.968 Mean :19.66 Mean :24.112 Mean :29.373 Mean :22.640 Mean :19.961 Mean :23.304 Mean :20.444 Mean :17.920
3rd Qu.:33.787 3rd Qu.:28.00 3rd Qu.:34.094 3rd Qu.:39.834 3rd Qu.:31.994 3rd Qu.:28.324 3rd Qu.:32.612 3rd Qu.:29.159 3rd Qu.:26.040
Max. :65.858 Max. :62.00 Max. :66.063 Max. :69.889 Max. :64.663 Max. :62.216 Max. :65.075 Max. :62.773 Max. :60.694
PDM1 PDM2 PDM3 PDM4 PDM5 PDM6 PDM7 PDM8 PDM9
Min. : 2.328 Min. : 1.924 Min. : 1.84 Min. : 3.929 Min. : 2.001 Min. : 4.031 Min. : 5.945 Min. : 3.331 Min. : 2.108
1st Qu.: 32.797 1st Qu.: 32.555 1st Qu.: 32.50 1st Qu.: 33.757 1st Qu.: 32.601 1st Qu.: 33.819 1st Qu.: 34.967 1st Qu.: 33.399 1st Qu.: 32.665
Median : 32.797 Median : 32.555 Median : 32.50 Median : 33.757 Median : 32.601 Median : 33.819 Median : 34.967 Median : 33.399 Median : 32.665
Mean : 49.085 Mean : 45.384 Mean : 45.65 Mean : 55.804 Mean : 46.282 Mean : 56.079 Mean : 68.347 Mean : 52.866 Mean : 47.051
3rd Qu.: 32.797 3rd Qu.: 59.244 3rd Qu.: 58.40 3rd Qu.: 79.290 3rd Qu.: 60.011 3rd Qu.: 80.313 3rd Qu.: 99.445 3rd Qu.: 73.315 3rd Qu.: 61.080
Max. :163.275 Max. :159.244 Max. :158.40 Max. :179.290 Max. :160.011 Max. :180.313 Max. :199.445 Max. :173.315 Max. :161.080
PDM10 PDM11 PDM12 RLM1 RLM2 RLM3 RLM4 RLM5 RLM6
Min. : 3.537 Min. : 2.386 Min. : 1.347 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000
1st Qu.: 33.522 1st Qu.: 32.832 1st Qu.: 32.208 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000
Median : 33.522 Median : 32.832 Median : 32.208 Median :1.000 Median :1.000 Median :1.000 Median :1.000 Median :1.000 Median :1.000
Mean : 54.494 Mean : 47.882 Mean : 42.551 Mean :1.373 Mean :1.425 Mean :1.429 Mean :1.878 Mean :1.436 Mean :1.866
3rd Qu.: 75.374 3rd Qu.: 63.862 3rd Qu.: 53.468 3rd Qu.:1.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:3.000 3rd Qu.:2.000 3rd Qu.:3.000
Max. :175.374 Max. :163.862 Max. :153.468 Max. :4.000 Max. :4.000 Max. :4.000 Max. :5.000 Max. :4.000 Max. :5.000
RLM7 RLM8 RLM9 RLM10 RLM11 RLM12 PSEM1 PSEM2
Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :1.500 Min. :1.50
1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.750 1st Qu.:1.75
Median :1.000 Median :1.000 Median :1.000 Median :1.000 Median :1.000 Median :1.000 Median :2.000 Median :2.00
Mean :1.955 Mean :1.441 Mean :1.445 Mean :1.895 Mean :1.429 Mean :1.419 Mean :1.892 Mean :1.90
3rd Qu.:3.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:3.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.00
Max. :5.000 Max. :4.000 Max. :4.000 Max. :5.000 Max. :4.000 Max. :4.000 Max. :2.000 Max. :2.00
datos.integrados <- datos.alumnos.df
setwd(local.path)
The working directory was changed to /Users/jos/Downloads inside a notebook chunk. The working directory will be reset when the chunk is finished running. Use the knitr root.dir option in the setup chunk to change the working directory for notebook chunks.
save(datos.integrados, file="datos.integrados.R")
getwd()
[1] "/Users/jos/Downloads"
load("datos.integrados.R")
datos.integrados
head(datos.integrados)
NA
#Separar 100 alumnos que no entraran en Kmeans
set.seed(1234)
ind <- sample(x=c(0,1),size=nrow(datos.integrados),
replace=TRUE,prob = c(0.9,0.1))
ind
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[80] 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1
[159] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[238] 0 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0
[317] 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0
[396] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
[475] 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0
[554] 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0
[633] 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[712] 1 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
[791] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 1 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0
[870] 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
[949] 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0
alumnos.nuevos <- datos.integrados[ind==1,]
alumnos.actuales <- datos.integrados[ind==0,]
alumnos.nuevos
alumnos.actuales
summary(alumnos.nuevos)
genero admision.letras admision.numeros promedio.preparatoria edad.ingreso evalucion.socioeconomica nota.conducta BECA AM1 AM2
1:45 Min. :44.94 Min. : 4.878 Min. : 60.00 17 :28 1: 6 Min. : 9.00 0:99 Min. :1.875 Min. :1.406
2:75 1st Qu.:57.09 1st Qu.:29.176 1st Qu.: 61.26 19 :26 2:15 1st Qu.:14.00 1:21 1st Qu.:1.875 1st Qu.:1.875
Median :59.97 Median :34.947 Median : 69.92 18 :16 3:16 Median :15.00 Median :1.875 Median :1.875
Mean :60.08 Mean :35.167 Mean : 72.31 16 :15 4:83 Mean :15.52 Mean :1.875 Mean :1.786
3rd Qu.:63.28 3rd Qu.:41.556 3rd Qu.: 79.83 20 :13 3rd Qu.:17.00 3rd Qu.:1.875 3rd Qu.:1.875
Max. :72.00 Max. :58.992 Max. :100.00 15 :12 Max. :20.00 Max. :1.875 Max. :1.875
(Other):10
AM3 AM4 AM5 AM6 AM7 AM8 AM9 AM10 AM11 AM12
Min. :1.031 Min. :1.031 Min. :1.375 Min. :1.125 Min. :1.406 Min. :1.125 Min. :1.562 Min. :1.219 Min. :1.562 Min. :1.438
1st Qu.:1.719 1st Qu.:1.812 1st Qu.:1.906 1st Qu.:1.875 1st Qu.:1.688 1st Qu.:1.938 1st Qu.:1.797 1st Qu.:2.000 1st Qu.:1.781 1st Qu.:1.969
Median :2.000 Median :1.812 Median :1.906 Median :1.875 Median :1.688 Median :1.938 Median :1.844 Median :2.000 Median :1.969 Median :1.969
Mean :1.847 Mean :1.670 Mean :1.808 Mean :1.739 Mean :1.641 Mean :1.825 Mean :1.778 Mean :1.885 Mean :1.892 Mean :1.897
3rd Qu.:2.000 3rd Qu.:1.812 3rd Qu.:1.906 3rd Qu.:1.875 3rd Qu.:1.688 3rd Qu.:1.938 3rd Qu.:1.844 3rd Qu.:2.000 3rd Qu.:1.969 3rd Qu.:1.969
Max. :2.000 Max. :1.812 Max. :1.906 Max. :1.875 Max. :1.688 Max. :1.938 Max. :1.844 Max. :2.000 Max. :1.969 Max. :1.969
CM1 CM2 CM3 CM4 CM5 CM6 CM7 CM8 CM9
Min. : 7.594 Min. : 8.218 Min. : 8.439 Min. : 7.487 Min. : 8.214 Min. : 9.86 Min. : 9.467 Min. : 7.685 Min. : 6.615
1st Qu.:11.956 1st Qu.:12.331 1st Qu.:12.463 1st Qu.:11.892 1st Qu.:12.328 1st Qu.:13.32 1st Qu.:13.080 1st Qu.:12.011 1st Qu.:11.369
Median :11.956 Median :12.331 Median :12.463 Median :11.892 Median :12.328 Median :15.20 Median :13.080 Median :12.011 Median :11.369
Mean :12.729 Mean :13.579 Mean :13.628 Mean :13.225 Mean :13.702 Mean :15.15 Mean :14.247 Mean :13.263 Mean :12.507
3rd Qu.:11.956 3rd Qu.:15.775 3rd Qu.:15.951 3rd Qu.:15.189 3rd Qu.:15.771 3rd Qu.:17.09 3rd Qu.:16.773 3rd Qu.:15.348 3rd Qu.:14.492
Max. :18.638 Max. :18.887 Max. :18.976 Max. :18.595 Max. :18.885 Max. :19.54 Max. :19.387 Max. :18.674 Max. :18.246
CM10 CM11 CM12 TM1 TM2 TM3 TM4 TM5 TM6
Min. : 8.036 Min. : 6.694 Min. : 8.218 Min. : 8.648 Min. : 8.036 Min. : 8.11 Min. : 7.457 Min. : 8.608 Min. : 8.735
1st Qu.:12.221 1st Qu.:11.417 1st Qu.:12.331 1st Qu.:12.589 1st Qu.:12.221 1st Qu.:12.27 1st Qu.:11.874 1st Qu.:12.565 1st Qu.:12.641
Median :12.221 Median :11.417 Median :12.331 Median :12.589 Median :12.221 Median :12.27 Median :11.874 Median :12.565 Median :14.415
Mean :13.653 Mean :12.172 Mean :13.711 Mean :13.355 Mean :13.448 Mean :13.40 Mean :13.204 Mean :13.986 Mean :14.364
3rd Qu.:15.628 3rd Qu.:14.556 3rd Qu.:15.774 3rd Qu.:12.589 3rd Qu.:15.629 3rd Qu.:15.69 3rd Qu.:15.166 3rd Qu.:16.087 3rd Qu.:16.188
Max. :18.814 Max. :18.278 Max. :18.887 Max. :19.059 Max. :18.814 Max. :18.84 Max. :18.583 Max. :19.043 Max. :19.094
TM7 TM8 TM9 TM10 TM11 TM12 VBM1 VBM2 VBM3
Min. : 7.965 Min. : 8.657 Min. : 6.836 Min. : 8.418 Min. : 7.003 Min. : 8.624 Min. : 1.531 Min. : 1.37 Min. : 1.336
1st Qu.:12.179 1st Qu.:12.594 1st Qu.:11.502 1st Qu.:12.451 1st Qu.:11.602 1st Qu.:12.574 1st Qu.:12.655 1st Qu.:11.85 1st Qu.:11.680
Median :12.179 Median :12.594 Median :11.502 Median :12.451 Median :11.602 Median :12.574 Median :12.655 Median :11.85 Median :11.680
Mean :13.151 Mean :13.943 Mean :12.666 Mean :13.918 Mean :12.397 Mean :14.001 Mean :18.942 Mean :19.67 Mean :19.901
3rd Qu.:15.572 3rd Qu.:16.126 3rd Qu.:14.669 3rd Qu.:15.934 3rd Qu.:14.802 3rd Qu.:16.099 3rd Qu.:12.655 3rd Qu.:27.77 3rd Qu.:27.521
Max. :18.786 Max. :19.063 Max. :18.334 Max. :18.967 Max. :18.401 Max. :19.050 Max. :62.655 Max. :61.85 Max. :61.680
VBM4 VBM5 VBM6 VBM7 VBM8 VBM9 VBM10 VBM11 VBM12
Min. : 2.172 Min. : 1.40 Min. : 2.213 Min. : 2.978 Min. : 1.933 Min. : 1.443 Min. : 2.015 Min. : 1.554 Min. : 1.139
1st Qu.:15.858 1st Qu.:12.00 1st Qu.:16.063 1st Qu.:19.889 1st Qu.:14.663 1st Qu.:12.216 1st Qu.:15.075 1st Qu.:12.773 1st Qu.:10.694
Median :15.858 Median :12.00 Median :25.078 Median :19.889 Median :14.663 Median :12.216 Median :15.075 Median :12.773 Median :10.694
Mean :24.723 Mean :20.29 Mean :26.704 Mean :27.247 Mean :22.746 Mean :20.068 Mean :24.151 Mean :20.014 Mean :18.761
3rd Qu.:33.787 3rd Qu.:28.00 3rd Qu.:34.094 3rd Qu.:39.834 3rd Qu.:31.994 3rd Qu.:28.324 3rd Qu.:32.612 3rd Qu.:29.159 3rd Qu.:26.040
Max. :65.858 Max. :62.00 Max. :66.063 Max. :69.889 Max. :64.663 Max. :62.216 Max. :65.075 Max. :62.773 Max. :60.694
PDM1 PDM2 PDM3 PDM4 PDM5 PDM6 PDM7 PDM8 PDM9
Min. : 2.328 Min. : 1.924 Min. : 1.84 Min. : 3.929 Min. : 2.001 Min. : 4.031 Min. : 5.945 Min. : 3.331 Min. : 2.108
1st Qu.: 32.797 1st Qu.: 32.555 1st Qu.: 32.50 1st Qu.: 33.757 1st Qu.: 32.601 1st Qu.: 33.819 1st Qu.: 34.967 1st Qu.: 33.399 1st Qu.: 32.665
Median : 32.797 Median : 32.555 Median : 32.50 Median : 33.757 Median : 32.601 Median : 57.066 Median : 34.967 Median : 33.399 Median : 32.665
Mean : 48.853 Mean : 46.181 Mean : 48.16 Mean : 57.651 Mean : 47.534 Mean : 63.165 Mean : 62.721 Mean : 53.190 Mean : 47.036
3rd Qu.: 32.797 3rd Qu.: 59.244 3rd Qu.: 58.40 3rd Qu.: 79.290 3rd Qu.: 60.011 3rd Qu.: 80.313 3rd Qu.: 99.445 3rd Qu.: 73.315 3rd Qu.: 61.080
Max. :163.275 Max. :159.244 Max. :158.40 Max. :179.290 Max. :160.011 Max. :180.313 Max. :199.445 Max. :173.315 Max. :161.080
PDM10 PDM11 PDM12 RLM1 RLM2 RLM3 RLM4 RLM5 RLM6 RLM7
Min. : 3.537 Min. : 2.386 Min. : 1.347 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.0
1st Qu.: 33.522 1st Qu.: 32.832 1st Qu.: 32.208 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.0
Median : 33.522 Median : 32.832 Median : 32.208 Median :1.000 Median :1.000 Median :1.000 Median :1.000 Median :1.000 Median :2.000 Median :1.0
Mean : 56.773 Mean : 47.359 Mean : 44.220 Mean :1.367 Mean :1.442 Mean :1.458 Mean :1.958 Mean :1.475 Mean :2.092 Mean :1.8
3rd Qu.: 75.374 3rd Qu.: 63.862 3rd Qu.: 53.468 3rd Qu.:1.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:3.000 3rd Qu.:2.000 3rd Qu.:3.000 3rd Qu.:3.0
Max. :175.374 Max. :163.862 Max. :153.468 Max. :4.000 Max. :4.000 Max. :4.000 Max. :5.000 Max. :4.000 Max. :5.000 Max. :5.0
RLM8 RLM9 RLM10 RLM11 RLM12 PSEM1 PSEM2
Min. :0.00 Min. :0.00 Min. :0.000 Min. :0.000 Min. :0.000 Min. :1.50 Min. :1.500
1st Qu.:1.00 1st Qu.:1.00 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.75 1st Qu.:1.750
Median :1.00 Median :1.00 Median :1.000 Median :1.000 Median :1.000 Median :2.00 Median :2.000
Mean :1.45 Mean :1.45 Mean :1.958 Mean :1.383 Mean :1.475 Mean :1.89 Mean :1.923
3rd Qu.:2.00 3rd Qu.:2.00 3rd Qu.:3.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.00 3rd Qu.:2.000
Max. :4.00 Max. :4.00 Max. :5.000 Max. :4.000 Max. :4.000 Max. :2.00 Max. :2.000
summary(alumnos.actuales)
genero admision.letras admision.numeros promedio.preparatoria edad.ingreso evalucion.socioeconomica nota.conducta BECA AM1 AM2
1:360 Min. :44.99 Min. : 4.986 Min. : 60.00 17 :172 1: 50 Min. : 9.00 0:738 Min. :1.875 Min. :1.406
2:520 1st Qu.:56.59 1st Qu.:28.187 1st Qu.: 60.00 18 :151 2: 92 1st Qu.:14.00 1:142 1st Qu.:1.875 1st Qu.:1.875
Median :60.04 Median :35.076 Median : 70.11 19 :140 3:136 Median :15.50 Median :1.875 Median :1.875
Mean :60.05 Mean :35.107 Mean : 72.24 16 :125 4:602 Mean :15.53 Mean :1.875 Mean :1.778
3rd Qu.:63.67 3rd Qu.:42.335 3rd Qu.: 81.00 20 :100 3rd Qu.:17.00 3rd Qu.:1.875 3rd Qu.:1.875
Max. :77.71 Max. :70.411 Max. :100.00 15 : 86 Max. :20.00 Max. :1.875 Max. :1.875
(Other):106
AM3 AM4 AM5 AM6 AM7 AM8 AM9 AM10 AM11 AM12
Min. :1.031 Min. :1.031 Min. :1.375 Min. :1.125 Min. :1.406 Min. :1.125 Min. :1.562 Min. :1.219 Min. :1.562 Min. :1.438
1st Qu.:1.719 1st Qu.:1.406 1st Qu.:1.562 1st Qu.:1.438 1st Qu.:1.594 1st Qu.:1.688 1st Qu.:1.797 1st Qu.:2.000 1st Qu.:1.969 1st Qu.:1.969
Median :2.000 Median :1.812 Median :1.906 Median :1.875 Median :1.688 Median :1.938 Median :1.844 Median :2.000 Median :1.969 Median :1.969
Mean :1.836 Mean :1.656 Mean :1.793 Mean :1.717 Mean :1.631 Mean :1.798 Mean :1.781 Mean :1.870 Mean :1.892 Mean :1.872
3rd Qu.:2.000 3rd Qu.:1.812 3rd Qu.:1.906 3rd Qu.:1.875 3rd Qu.:1.688 3rd Qu.:1.938 3rd Qu.:1.844 3rd Qu.:2.000 3rd Qu.:1.969 3rd Qu.:1.969
Max. :2.000 Max. :1.812 Max. :1.906 Max. :1.875 Max. :1.688 Max. :1.938 Max. :1.844 Max. :2.000 Max. :1.969 Max. :1.969
CM1 CM2 CM3 CM4 CM5 CM6 CM7 CM8 CM9
Min. : 7.594 Min. : 8.218 Min. : 8.439 Min. : 7.487 Min. : 8.214 Min. : 9.86 Min. : 9.467 Min. : 7.685 Min. : 6.615
1st Qu.:11.956 1st Qu.:12.331 1st Qu.:12.463 1st Qu.:11.892 1st Qu.:12.328 1st Qu.:13.32 1st Qu.:13.080 1st Qu.:12.011 1st Qu.:11.369
Median :11.956 Median :12.331 Median :12.463 Median :11.892 Median :12.328 Median :13.32 Median :13.080 Median :12.011 Median :11.369
Mean :12.754 Mean :13.566 Mean :13.711 Mean :13.042 Mean :13.566 Mean :14.67 Mean :14.648 Mean :13.229 Mean :12.491
3rd Qu.:11.956 3rd Qu.:15.775 3rd Qu.:15.951 3rd Qu.:15.189 3rd Qu.:15.771 3rd Qu.:17.09 3rd Qu.:16.773 3rd Qu.:15.348 3rd Qu.:14.492
Max. :18.638 Max. :18.887 Max. :18.976 Max. :18.595 Max. :18.885 Max. :19.54 Max. :19.387 Max. :18.674 Max. :18.246
CM10 CM11 CM12 TM1 TM2 TM3 TM4 TM5 TM6
Min. : 8.036 Min. : 6.694 Min. : 8.218 Min. : 8.648 Min. : 8.036 Min. : 8.11 Min. : 7.457 Min. : 8.608 Min. : 8.735
1st Qu.:12.221 1st Qu.:11.417 1st Qu.:12.331 1st Qu.:12.589 1st Qu.:12.221 1st Qu.:12.27 1st Qu.:11.874 1st Qu.:12.565 1st Qu.:12.641
Median :12.221 Median :11.417 Median :12.331 Median :12.589 Median :12.221 Median :12.27 Median :11.874 Median :12.565 Median :12.641
Mean :13.466 Mean :12.506 Mean :13.516 Mean :13.377 Mean :13.435 Mean :13.48 Mean :13.021 Mean :13.849 Mean :13.871
3rd Qu.:15.628 3rd Qu.:14.556 3rd Qu.:15.774 3rd Qu.:12.589 3rd Qu.:15.629 3rd Qu.:15.69 3rd Qu.:15.166 3rd Qu.:16.087 3rd Qu.:16.188
Max. :18.814 Max. :18.278 Max. :18.887 Max. :19.059 Max. :18.814 Max. :18.84 Max. :18.583 Max. :19.043 Max. :19.094
TM7 TM8 TM9 TM10 TM11 TM12 VBM1 VBM2 VBM3
Min. : 7.965 Min. : 8.657 Min. : 6.836 Min. : 8.418 Min. : 7.003 Min. : 8.624 Min. : 1.531 Min. : 1.37 Min. : 1.336
1st Qu.:12.179 1st Qu.:12.594 1st Qu.:11.502 1st Qu.:12.451 1st Qu.:11.602 1st Qu.:12.574 1st Qu.:12.655 1st Qu.:11.85 1st Qu.:11.680
Median :12.179 Median :12.594 Median :11.502 Median :12.451 Median :11.602 Median :12.574 Median :12.655 Median :11.85 Median :11.680
Mean :13.591 Mean :13.917 Mean :12.648 Mean :13.737 Mean :12.728 Mean :13.806 Mean :19.036 Mean :19.24 Mean :19.046
3rd Qu.:15.572 3rd Qu.:16.126 3rd Qu.:14.669 3rd Qu.:15.934 3rd Qu.:14.802 3rd Qu.:16.099 3rd Qu.:12.655 3rd Qu.:27.77 3rd Qu.:27.521
Max. :18.786 Max. :19.063 Max. :18.334 Max. :18.967 Max. :18.401 Max. :19.050 Max. :62.655 Max. :61.85 Max. :61.680
VBM4 VBM5 VBM6 VBM7 VBM8 VBM9 VBM10 VBM11 VBM12
Min. : 2.172 Min. : 1.40 Min. : 2.213 Min. : 2.978 Min. : 1.933 Min. : 1.443 Min. : 2.015 Min. : 1.554 Min. : 1.139
1st Qu.:15.858 1st Qu.:12.00 1st Qu.:16.063 1st Qu.:19.889 1st Qu.:14.663 1st Qu.:12.216 1st Qu.:15.075 1st Qu.:12.773 1st Qu.:10.694
Median :15.858 Median :12.00 Median :16.063 Median :19.889 Median :14.663 Median :12.216 Median :15.075 Median :12.773 Median :10.694
Mean :23.866 Mean :19.57 Mean :23.758 Mean :29.663 Mean :22.626 Mean :19.946 Mean :23.188 Mean :20.502 Mean :17.805
3rd Qu.:33.787 3rd Qu.:28.00 3rd Qu.:34.094 3rd Qu.:39.834 3rd Qu.:31.994 3rd Qu.:28.324 3rd Qu.:32.612 3rd Qu.:29.159 3rd Qu.:26.040
Max. :65.858 Max. :62.00 Max. :66.063 Max. :69.889 Max. :64.663 Max. :62.216 Max. :65.075 Max. :62.773 Max. :60.694
PDM1 PDM2 PDM3 PDM4 PDM5 PDM6 PDM7 PDM8 PDM9
Min. : 2.328 Min. : 1.924 Min. : 1.84 Min. : 3.929 Min. : 2.001 Min. : 4.031 Min. : 5.945 Min. : 3.331 Min. : 2.108
1st Qu.: 32.797 1st Qu.: 32.555 1st Qu.: 32.50 1st Qu.: 33.757 1st Qu.: 32.601 1st Qu.: 33.819 1st Qu.: 34.967 1st Qu.: 33.399 1st Qu.: 32.665
Median : 32.797 Median : 32.555 Median : 32.50 Median : 33.757 Median : 32.601 Median : 33.819 Median : 34.967 Median : 33.399 Median : 32.665
Mean : 49.116 Mean : 45.275 Mean : 45.31 Mean : 55.552 Mean : 46.111 Mean : 55.113 Mean : 69.114 Mean : 52.821 Mean : 47.053
3rd Qu.: 32.797 3rd Qu.: 59.244 3rd Qu.: 58.40 3rd Qu.: 79.290 3rd Qu.: 60.011 3rd Qu.: 80.313 3rd Qu.: 99.445 3rd Qu.: 73.315 3rd Qu.: 61.080
Max. :163.275 Max. :159.244 Max. :158.40 Max. :179.290 Max. :160.011 Max. :180.313 Max. :199.445 Max. :173.315 Max. :161.080
PDM10 PDM11 PDM12 RLM1 RLM2 RLM3 RLM4 RLM5 RLM6
Min. : 3.537 Min. : 2.386 Min. : 1.347 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000
1st Qu.: 33.522 1st Qu.: 32.832 1st Qu.: 32.208 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000
Median : 33.522 Median : 32.832 Median : 32.208 Median :1.000 Median :1.000 Median :1.000 Median :1.000 Median :1.000 Median :1.000
Mean : 54.183 Mean : 47.953 Mean : 42.323 Mean :1.374 Mean :1.423 Mean :1.425 Mean :1.867 Mean :1.431 Mean :1.835
3rd Qu.: 75.374 3rd Qu.: 63.862 3rd Qu.: 53.468 3rd Qu.:1.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:3.000 3rd Qu.:2.000 3rd Qu.:3.000
Max. :175.374 Max. :163.862 Max. :153.468 Max. :4.000 Max. :4.000 Max. :4.000 Max. :5.000 Max. :4.000 Max. :5.000
RLM7 RLM8 RLM9 RLM10 RLM11 RLM12 PSEM1 PSEM2
Min. :0.000 Min. :0.00 Min. :0.000 Min. :0.000 Min. :0.000 Min. :0.000 Min. :1.500 Min. :1.500
1st Qu.:1.000 1st Qu.:1.00 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.000 1st Qu.:1.750 1st Qu.:1.750
Median :1.000 Median :1.00 Median :1.000 Median :1.000 Median :1.000 Median :1.000 Median :2.000 Median :2.000
Mean :1.976 Mean :1.44 Mean :1.444 Mean :1.886 Mean :1.435 Mean :1.411 Mean :1.893 Mean :1.897
3rd Qu.:3.000 3rd Qu.:2.00 3rd Qu.:2.000 3rd Qu.:3.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.000 3rd Qu.:2.000
Max. :5.000 Max. :4.00 Max. :4.000 Max. :5.000 Max. :4.000 Max. :4.000 Max. :2.000 Max. :2.000
set.seed(1234)
ind <- sample(x=c(0,1),size=nrow(alumnos.actuales),
replace=TRUE,prob = c(0.7,0.3))
ind
[1] 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 0
[81] 1 0 0 0 0 1 0 0 0 1 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 1 0 1 0 0 0 0 1 0 1 0 1 0 0
[161] 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 1 1 1 1 1 1 0 0 0 0 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 1
[241] 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 1 0 1 0 0 1 0 0 0 0 0 1 1 1 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1
[321] 0 1 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 1 0 0 1 0 1 1 1 0 1 0 1 0 0 0 0 1 1 0 0 1 1 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 0 0 1 0 0 0 0
[401] 0 0 1 1 0 0 1 0 0 0 1 1 1 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 1 1 0 1 1 1 0 1 0 1 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0
[481] 0 0 0 0 0 0 1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 1 1 1 0 1 0 1 1 0 0 1 0 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 0 1 1 1 1 0 0 1 0 1 1 0 0 0 1
[561] 0 1 0 1 0 1 1 0 0 0 0 1 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 0 1 0 1 0 1 0 0 1 0 0 0 1 1 0 1 0 0
[641] 0 0 0 1 0 0 0 1 0 1 0 0 1 0 0 0 1 0 0 1 0 1 1 0 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 1 0 0 0 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 0
[721] 1 0 1 0 0 1 0 0 0 1 1 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 1 0 1 0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 1 0 0 0 1 0 0 1 0 1
[801] 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 1 0 1 1 1 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 0 0
alumnos.training <- alumnos.actuales[ind==0,]
alumnos.test <- alumnos.actuales[ind==1,]
str(alumnos.training)
'data.frame': 613 obs. of 82 variables:
$ genero : Factor w/ 2 levels "1","2": 2 2 2 1 2 2 2 1 2 1 ...
$ admision.letras : num 60.1 59.1 53.1 57 61.9 ...
$ admision.numeros : num 35.2 33.2 21.3 29 38.9 ...
$ promedio.preparatoria : num 70.3 67.2 60 61 75.8 ...
$ edad.ingreso : Factor w/ 15 levels "11","12","13",..: 8 7 5 6 8 5 7 4 7 10 ...
$ evalucion.socioeconomica: Factor w/ 4 levels "1","2","3","4": 4 4 4 4 4 4 4 4 4 4 ...
$ nota.conducta : num 16 15 13 14 16 13 15 12 15 18 ...
$ BECA : Factor w/ 2 levels "0","1": 1 1 1 1 1 1 1 1 1 1 ...
$ AM1 : num 1.88 1.88 1.88 1.88 1.88 ...
$ AM2 : num 1.88 1.41 1.41 1.88 1.53 ...
$ AM3 : num 2 2 2 2 2 ...
$ AM4 : num 1.41 1.81 1.81 1.81 1.81 ...
$ AM5 : num 1.91 1.5 1.38 1.56 1.56 ...
$ AM6 : num 1.44 1.38 1.12 1.88 1.12 ...
$ AM7 : num 1.59 1.69 1.69 1.69 1.59 ...
$ AM8 : num 1.12 1.12 1.94 1.69 1.94 ...
$ AM9 : num 1.84 1.84 1.84 1.66 1.84 ...
$ AM10 : num 2 2 1.22 2 2 ...
$ AM11 : num 1.97 1.97 1.97 1.97 1.97 ...
$ AM12 : num 1.97 1.97 1.97 1.97 1.78 ...
$ CM1 : num 12 12 12 12 12 ...
$ CM2 : num 12.33 12.33 15.77 15.77 8.22 ...
$ CM3 : num 12.5 12.5 12.5 16 16 ...
$ CM4 : num 15.2 11.9 11.9 15.2 15.2 ...
$ CM5 : num 12.3 15.8 12.3 12.3 12.3 ...
$ CM6 : num 17.1 17.1 13.3 17.1 19.5 ...
$ CM7 : num 9.47 13.08 13.08 13.08 19.39 ...
$ CM8 : num 12.01 15.35 12.01 7.69 12.01 ...
$ CM9 : num 11.4 11.4 11.4 18.2 11.4 ...
$ CM10 : num 12.2 12.2 12.2 15.6 15.6 ...
$ CM11 : num 11.4 11.4 11.4 11.4 11.4 ...
$ CM12 : num 12.33 12.33 12.33 15.77 8.22 ...
$ TM1 : num 12.6 12.6 12.6 12.6 12.6 ...
$ TM2 : num 12.22 12.22 15.63 15.63 8.04 ...
$ TM3 : num 12.3 12.3 12.3 15.7 15.7 ...
$ TM4 : num 15.2 11.9 11.9 15.2 15.2 ...
$ TM5 : num 12.6 16.1 12.6 12.6 12.6 ...
$ TM6 : num 16.2 16.2 12.6 16.2 19.1 ...
$ TM7 : num 7.97 12.18 12.18 12.18 18.79 ...
$ TM8 : num 12.59 16.13 12.59 8.66 12.59 ...
$ TM9 : num 11.5 11.5 11.5 18.3 11.5 ...
$ TM10 : num 12.5 12.5 12.5 15.9 15.9 ...
$ TM11 : num 11.6 11.6 11.6 11.6 11.6 ...
$ TM12 : num 12.57 12.57 12.57 16.1 8.62 ...
$ VBM1 : num 12.7 12.7 12.7 12.7 12.7 ...
$ VBM2 : num 11.85 11.85 27.77 27.77 1.37 ...
$ VBM3 : num 11.7 11.7 11.7 27.5 27.5 ...
$ VBM4 : num 33.8 15.9 15.9 33.8 33.8 ...
$ VBM5 : num 12 28 12 12 12 ...
$ VBM6 : num 34.1 34.1 16.1 34.1 66.1 ...
$ VBM7 : num 2.98 19.89 19.89 19.89 69.89 ...
$ VBM8 : num 14.66 31.99 14.66 1.93 14.66 ...
$ VBM9 : num 12.2 12.2 12.2 62.2 12.2 ...
$ VBM10 : num 15.1 15.1 15.1 32.6 32.6 ...
$ VBM11 : num 12.8 12.8 12.8 12.8 12.8 ...
$ VBM12 : num 10.69 10.69 10.69 26.04 1.14 ...
$ PDM1 : num 32.8 32.8 32.8 32.8 32.8 ...
$ PDM2 : num 32.55 32.55 59.24 59.24 1.92 ...
$ PDM3 : num 32.5 32.5 32.5 58.4 58.4 ...
$ PDM4 : num 79.3 33.8 33.8 79.3 79.3 ...
$ PDM5 : num 32.6 60 32.6 32.6 32.6 ...
$ PDM6 : num 80.3 80.3 33.8 80.3 180.3 ...
$ PDM7 : num 5.94 34.97 34.97 34.97 199.45 ...
$ PDM8 : num 33.4 73.31 33.4 3.33 33.4 ...
$ PDM9 : num 32.7 32.7 32.7 161.1 32.7 ...
$ PDM10 : num 33.5 33.5 33.5 75.4 75.4 ...
$ PDM11 : num 32.8 32.8 32.8 32.8 32.8 ...
$ PDM12 : num 32.21 32.21 32.21 53.47 1.35 ...
$ RLM1 : num 1 1 1 1 1 4 2 1 1 1 ...
$ RLM2 : num 1 1 2 2 0 2 1 1 2 1 ...
$ RLM3 : num 1 1 1 2 2 2 2 1 2 1 ...
$ RLM4 : num 3 1 1 3 3 3 3 1 1 1 ...
$ RLM5 : num 1 2 1 1 1 2 1 1 2 1 ...
$ RLM6 : num 3 3 1 3 5 0 3 1 3 0 ...
$ RLM7 : num 0 1 1 1 5 3 1 1 3 1 ...
$ RLM8 : num 1 2 1 0 1 4 0 1 2 1 ...
$ RLM9 : num 1 1 1 4 1 2 2 1 1 2 ...
$ RLM10 : num 1 1 1 3 3 3 3 5 3 1 ...
$ RLM11 : num 1 1 1 1 1 2 1 1 1 1 ...
$ RLM12 : num 1 1 1 2 0 2 1 1 1 1 ...
$ PSEM1 : num 2 2 2 2 2 1.5 2 2 2 2 ...
$ PSEM2 : num 2 1.5 1.5 2 1.5 2 2 2 2 2 ...
set.seed(2020)
wss.alumnos <-vector()
wss.alumnos
logical(0)
centroides.alumnos <- 25
for ( i in 1:centroides.alumnos ) wss.alumnos[i] <- sum(kmeans(alumnos.training,centers = i)$withinss)
#plot
plot(1:centroides.alumnos , wss.alumnos , type="b", xlab="Numer de clusters", ylab="Error standard")
imgPath.codo <- paste(local.path,"/Kmeans-codo-alumnos.png",sep = "")
img.codo.alumnos <- readPNG(imgPath.codo)
plot.new()
rasterImage(img.codo.alumnos,0,0,1,1)
set.seed(2020)
wss.alumnos <-vector()
wss.alumnos
logical(0)
centroides.alumnos <- 10
for ( i in 1:centroides.alumnos ) wss.alumnos[i] <- sum(kmeans(alumnos.training,centers = i)$withinss)
#plot
plot(1:centroides.alumnos , wss.alumnos , type="b", xlab="Numer de clusters", ylab="Error standard")
imgPath.codo.seleccionado <- paste(local.path,"/Kmeans-codo-alumnos-seleccionado.png",sep = "")
img.codo.sel.alumnos <- readPNG(imgPath.codo.seleccionado)
plot.new()
rasterImage(img.codo.sel.alumnos,0,0,1,1)
clustering.kmeans <- kmeans(x=alumnos.training, centers = 4)
clustering.kmeans$withinss
[1] 867289.6 2325698.5 1619780.3 3420804.7
alumnos.training$genero <- as.numeric(alumnos.training$genero)
alumnos.training$edad.ingreso <- as.numeric(alumnos.training$edad.ingreso)
alumnos.training$evalucion.socioeconomica <- as.numeric(alumnos.training$evalucion.socioeconomica)
alumnos.training$BECA <- as.numeric(alumnos.training$BECA)
sum(is.na(alumnos.training))
[1] 0
sum(is.infinite(alumnos.training))
Error in is.infinite(alumnos.training) :
default method not implemented for type 'list'
library(corrplot)
source("http://www.sthda.com/upload/rquery_cormat.r")
rquery.cormat(alumnos.training)
the standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zerothe standard deviation is zeroError in hclust(as.dist(1 - corr), method = hclust.method) :
NA/NaN/Inf in foreign function call (arg 10)
plot(clustering.kmeans$withinss)